<?php
 namespace app\controller;

use app\BaseController;
use think\facade\Db;

class Data extends BaseController {
    public function index(){
        $data = Db::table("class")->where("id", 10)->find();
        dump($data);
    }
     public function insert(){
        $table = [
            "id"=>null,
            "name" =>"jiang",
            "class" => 5,
            "show" => "8"
        ];
        
 //       $data = Db::table("class")->insert($table);
          $data = Db::table("class")->where("id","=","1" )->update(["name" => "shan"]);
          echo Db::getlastSql();
          dump($data);

    }
}

